package com.kingdee.eas.wgpro.report.app;

import org.apache.log4j.Logger;

import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.framework.report.util.RptParams;
import com.kingdee.eas.framework.report.util.RptRowSet;

public class TestFacadeControllerBean extends AbstractTestFacadeControllerBean
{
    private static Logger logger =
        Logger.getLogger("com.kingdee.eas.wgpro.report.app.TestFacadeControllerBean");

	@Override
	protected RptParams _query(Context ctx, RptParams params)
			throws BOSException, EASBizException {
		// TODO Auto-generated method stub
		
		StringBuffer sql=new StringBuffer();
		sql.append("\r\n select fbizdate,b.fname_l2 orgname,c.fname_l2 material,a.fqty,a.fbaseqty from t_mm_plannedorder a ");
		sql.append("\r\n left join T_ORG_BaseUnit b  on a.fcontrolunitid=b.fid ");
		sql.append("\r\n left join t_bd_material c on a.fmaterialid=c.fid ");
		sql.append("\r\n order by b.fname_l2,c.fname_l2 ");
		
		RptRowSet rs = executeQuery(sql.toString(), null, ctx);
		RptParams param = new RptParams();
		param.setObject("Result", rs);

		return param;
	}
    
    
}